﻿using System;
using System.Web;

namespace Cms.Web.Framework.Infrastructure.Wrappers
{
    public class CmsCache : ICmsCache
    {
        public void Insert(string key, object item, int duration)
        {
            HttpContext.Current.Cache.Insert(key, item, null, DateTime.Now.AddSeconds(duration), System.Web.Caching.Cache.NoSlidingExpiration);
        }

        public object Get(string key)
        {
            return HttpContext.Current.Cache[key];
        }
    }
}
